﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Server.aspx.cs" Inherits="_2011DBProject.Server" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<link rel=StyleSheet HREF='design1.css' type='text/css'>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>새벽 골프</title>

<script language="C#" runat="Server">
 //needed as cannot get Container.ItemIndex directly
 int GetItemIndex(int index)
 {
     return index;
 }
 </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <p align =left>
        <asp:Button ID="btnGoLogout" runat="server" onclick="btnGoLogout_onclick" 
            Text="☜ 로 그 아 웃" Width="150px" />
        </p>
        <br />
        <br />&nbsp;<asp:Label ID="Label1" runat="server" Font-Size="25pt" 
            ForeColor="#9EDCFF" Text="서버 선택"></asp:Label>
        <br />
        <br />
        <br />       
        <br />
        <br />              
        <center>
        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" 
                onitemcommand="Repeater1_ItemCommand" onitemdatabound="Repeater1_ItemDataBound">
        <HeaderTemplate><table><tr></HeaderTemplate>
            <ItemTemplate>
                <td>
                      <asp:Button ID="btnServer" CommandName="serverSelect" runat="server" Font-Size="40pt" Height="80px" Text=<%# Eval("SERVER_NAME") %> Width="300px" />
                <%# GetItemIndex(Container.ItemIndex+1) % 2 == 0 ? "</td></tr><tr>" : "</td>" %>
            </ItemTemplate> 
            <FooterTemplate></tr></table></FooterTemplate>
        </asp:Repeater>
        </center>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT &quot;SERVER_NAME&quot;, &quot;SERVER_NO&quot; FROM &quot;SERVER&quot;">
        </asp:SqlDataSource>
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <asp:Button ID="Button4" runat="server" onclick="Button4_Click" Text="계정정보" 
            Width="100px" />
&nbsp;
        <asp:Button ID="Button3" runat="server" Text="가상락커룸" Width="100px" 
            onclick="Button3_Click" />
        &nbsp;&nbsp;<asp:Button ID="Button5" runat="server" onclick="Button5_Click" Text="상품구매" 
            Width="100px" />
&nbsp;
        <asp:Button ID="Button6" runat="server" Text="결제내역" Width="100px" 
            onclick="Button6_Click" />
&nbsp;
        <br />
    </div>
    </form>
</body>
</html>
